home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 2
/
United Public Domain Gold 2.iso
/
utilities
/
pu216.dms
/
pu216.adf
/
WBase
/
WBase.doc
< prev
next >
Wrap
Text File
|
1989-08-17
|
26KB
|
586 lines
WBase V1.3 - Finished 24 May 1992
© 1992 Simon Dick
WBase now now
needs
reqtools.library to run, this is because I decided that
the GFA-BASIC built in versions of some of ReqTools commands took up too much
space. Also if it can find it, WBase uses kd_freq.library for its file
requester instead of the ReqTools version if it is found,but you are able to
choose which you want to use. If the powerpacker.library is found then it is
used to decrunch files. The file FR_User.doc is the manual for the kd_freq
file requester.
This program is Freeware which means that you can copy it and give it to
anybody you want as long as you don't ask for any money for it except perhaps
a small amount for disks and copying and that you don't need to send me any
money to use it (but I wouldn't mind if you did, and you would get the next
couple of versions). You aren't allowed to commercially sell any version of
WBase! Well at least not without my permission.
About WBase
===========
I wrote this because I kept on finding that I needed to quickly use a
database on Workbench, but all of the others which I have got all took up too
much space on the Workbench for my liking so I thought that I might as well
write my own as I had already written a database in AmigaBasic but which was
much to slow to be really useful so I started to convert it to GFA Basic when
I got it, but soon gave up and just rewrote it from scratch, here is the
result. This will run if you have only half meg but will be most useful with
more memory, as it takes up about 260K. I haven't been able to test this out
thoroughly with Kickstart 2.0 yet, but I believe that it works though. I'm not
responsible for any data which is lost or any damage which is caused due to
any problems though.
I never thought that I would actually do more than one version of WBase,
and here I am working on the third released version!
The Menus
=========
File
New - This lets you create a new database in memory. You can have a
maximum of 20 fields and a maximum of 300 records. After finding
out how big a database you want it them goes and asks you for each
fieldname one at a time. If you use every single character in each
field and use ten fields then you will only be able to use 150
records, so it stands to reason that you will probably be able to
use five fields and 300 records.
Load - This lets you load a previously saved data file. It handles both
crunched and uncrunched files . It also does a bit of checking to
make sure that the file is valid.
Save
Crunched - This saves a crunched version of the data which is
currently stored in the memory. This only works if you
have version 35 or above of powerpacker.library installed.
It crunches it with best efficiency with a medium speedup
buffer if you are interested.
Uncrunched - This just saves out the data stored in the memory as an
ASCII file which you can easily edit in any text editor if
you don't like the editing in WBase. There is a section on
that later on.
Delete- This simply lets you delete a file from a disk, it hasn't got
anything to do with deleting records from memory.
About - Tells you stuff like my address and the version of WBase.
Quit - This lets you exit from WBase (why would you want to do that ?).
You can also do this by clicking on the close gadget, pressing
escape or pressing 'Q' while the window is active.
Edit
Record - This lets you change the data which has already been entered
into memory.
Fieldname- This lets you change any of the current fieldnames.
Delete
All - If you select this it erases all of the records which
where stored in memory (after making sure you didn't
accidentally select it).
Section - This lets you delete a section of records from memory
(eg. from 1 to 14 or 102 to 324).
Single record - This lets you delete a single record, unfortunately
you need to know the actual record number beforehand
though (another way to delete a single record is to
view it and press 'D' to delete it).
View
All - This lets you look through all of you records one by one. There
are the following options:
F - Goes forward one record
P - Prints the current record
B - Goes back one record
M - Lets you mark and unmark a record
G - Lets you jump straight to a record by the record number
D - Lets you delete the current record
E - Lets you edit the current record
The left cursor key moves you back a record and the right cursor
key moves you forward one record. The up cursor moves to the end
of the file while the down cursor key moves to the beginning.
Section - This is done in the same way as the Delete Section (I mean by
entering the start and finish record numbers not by deleting the
records!) apart from that it has the same options as for View
All.
Single - You type in the number of the record that you want to view. It
has the following options:
P - Prints the current record
F - } these don't do anything
B - }
M - Lets you mark a record
D - Lets you delete the current record
E - Lets you edit the current record
Q - Lets you quit to the menu
The cursor keys also move you through it in the same way as in
View All.
Marked - This lets you view all of the records which you have marked and
has the same options as View Single has.
Print (this menu can be disabled by using the Printer menu item, see later
for more information)
All - If you select this then WBase will ask you if you are ready to
print before printing each record and also allowing you to
cancel printing that record.
Section - The same as the above except for being able to choose a section
of records to view.
Single - This lets you view a single records by record number.
Marked - This lets you print all of the previously marked records.
Sort
All - All that you need to tell this options is what field you want the
whole file to be sorted by.
Section - This works the same as the above except that it asks for start
and finish record numbers as well and it only sorts the records
between those numbers (inclusive).
Misc.
Input Record - This is one of the more important functions as it allows
you to enter data into the data file which is currently
in memory. It opens a window and shows you previously
entered data. It also now works for multiple records
being input, to cancel input press the Cancel gadget.
WARNING: if you press Cancel while it is on the last
field of the record then the whole record will
be wiped. You should OK the last field and then
Cancel the first field on the next record.
Search for data - This is mostly pretty straight forward except for one
part, that is when it asks you for the field to search
in, if you enter 0 there then it searches through all
of the fields and not just by one. This has the same
options as View Single has except that 'F' and 'B' go
forward and backwards.
Palette - This option will bring up a palette requester. Not much
point to having it in a database but it only added a few
lines so I thought I might as well put it in.
Printer - This simply toggles whether or not the Printer menu will
be enabled or not. If there is a tick next to it then it
is enabled.
Command - If you select this it allows you to run programs from
within WBase. If you run this from either CLI or
workbench it will display all output in a tiny window in
the top left of the screen, which means that it is now
alright to use the ARP 'ARun WBase NOIO' command as it
doesn't try to write to the CLI. Also if you can't
remember (or can't be bothered to type in) a command
then you can type in '*' and you can select the command
using a file requester, after you have selected it you
are given the chance to add extra options to it. You also
need the Run command in the C: directory.
Shrink/Expand - This is a toggle switch which lets you swap between
a full screen version of WBase and the original 'Shrunk'
version. This can be handy if your Workbench is getting
a bit crowded.
File Requesters
KD_FReq - This chooses the file requester from kd_freq.library to be
used for all file selections, it has a tick next to it if it
is selected. I personally prefer this requester.
ReqTools - This chooses the file requester from reqtools.library to
be used for all file selections, it has a tick next to it if
is selected.
Asl req - This chooses the file requester from asl.library. This is
ghosted if you are running less than WB2.0 because the
requester only works on WB2.x. Because of that I haven't been
able to test it as I have got WB1.3, it is based on an
example piece of code though so it should work. I don't know
how to use any extra features, just how to call it and get
the filename!
Gadgets
=======
In version 1.3 of WBase I have added gadgets to WBase in its expanded mode,
the size of WBases screen depends on you WB screen. For example, if you are an
NTSC user then WBase will open a NTSC screen (640x200) and if you are a PAL
user, then WBase will open a PAL screen (640x256). If you are running in
Interlace then WBase will open an interlaced screen (either 640x400 or
640x512). WBase finds out what screen mode you are using by finding out the
vertical size if your WB screen and choosing the screen which is closest.
WBase only supports Productivity mode if your Workbench is either 480 or 960
pixels high.
The gadgets are in the following order from left to right:
File - Load, save and delete
Input record
View
Sort
Search
Print
Command
Quit
They aren't exactly very obvious what each one is. If anyone can do a better
job of them please can you send me your own version of them. They must be 80
pixels across by 32 pixels down or less. I will choose the best ones and use
them in the next version.
Other Features
==============
- WBase scans some possible places which viruses may attach themselves to,
they are only checked when WBase is loaded. I don't make any claim that
WBase can replace a virus killer (because I know it can't!). It may not be
viruses which alter the vectors as it could be things like real virus
killers, recoverable ram drives, PPLoadSeg, etc. So be careful if you
agree to clear anything.
- WBase tries to trap guru meditations, so that you should be able to save
your data before the computer crashes. I haven't managed to test it as
Amigas never guru when you want to them, do they? I am not sure if it works
with KS2.0 though as I haven't got it (yet).
- WBase supports crunched files as long as you have powerpacker.library V33+
installed. I haven't implemented it very well though as I can't read the
file straight from memory, so that it needs to save the decrunched file to
somewhere. It tries places in this in order - T:, RAM:, DF0:. I am planning
to change this soon though.
ARexx Interface
===============
In this version I just added an ARexx interface (which I had been planning
to do for a while). I haven't actually got ARexx (or WB2.0) so I haven't been
able to test it out, so if you find any bugs please could you report them as
quickly as possible so that I can fix them.
For the ARexx interface too work you need rexxhost.library (which should be
included with WBase) and rexxsyslib.library in the LIBS: directory. You will
also need to run RexxMast to be able to send commands to WBase.
Here is the list of commands that WBase supports:-
ABOUT
Just brings up the About requesters. I doubt if you will use
this, but I put in just in case.
CHANGEFREQ <1|2|3>
This lets you change the default file requester. Number one is
kd_freq, number two is reqtools and number three is Asl.
CURFREQ
This returns the number of the file requester that it being
used. At the moment three are used, number one is kd_freq,
number two is reqtools and number three is Asl.
DELETE <record number>
This lets you delete a single record. You are asked for
confirmation first.
DELETEALL
This is exactly the same as 'Delete All' in the menus.
DELETESEC <start record> <end record>
This allows you to delete a section of records between start
and end inclusive.
EDIT <record number>
This lets you edit the specified record in the usual manner.
EDITFIELD [field number]
This lets you either edit all of the fields or just the one
specified.
EXEC <command>
This automatically runs the command. The Run command is needed
in the C: directory.
EXPAND
This 'enlarges' WBase from its Workbench window to its full
screen mode.
FILEREQ <title>
This is for you own use. It returns the selected filename in
'result'.
FRONTW
This simply brings either the shrunk window or the full screen
to the front and activates it.
INPUT
This brings up requesters to allow you to input records in the
normal way.
KILL [filename]
This lets you delete a file. If you don't specify a filename
then the current file requester will appear to allow you to
select a file.
LOAD [filename]
This allows you to load a data file. If you don't provide a
filename then the current file requester will appear to allow
you to select a file.
MAXFIELDS
This returns the number of fields used in the current data
file. It is returned in 'result'.
MAXRECS
This returns the maximum number of records which can be used.
It is returned in 'result'.
NEW
This is the same as 'New' in the File menu. It pops up
requesters to find out the data at the moment. I may add the
option to create a new database totally from ARexx in the next
version if that's what people want.
PALETTE
This brings up a colour requester. It returns the colour
selected as the result.
PRINT <record number>
This allows you to print out a single record.
PRINTALL
This is exactly the same as 'Print All' in the menus.
PRINTSEC <start record> <end record>
This prints out a section of records between start and end
inclusive. Before printing each record you are asked to
confirm the printing of that record.
PRTMENU <ON|OFF>
This lets you enable and disable the Printer menu. 'PRTMENU
ON' enables the menu and 'PRTMENU OFF' disables the menu.
QUIT
Allows you to quit from WBase using ARexx. It does the same as
'Quit' in the menu does, except that it doesn't ask for any
confirmation even if you have an altered database, so be
careful.
RECSUSED
This returns the number of records which have been used in the
current database. It is returned in 'result'.
SAVE [filename]
This allows you to save a data file. If you don't provide a
filename then the current file requester will appear to allow
you to select a file.
SEARCH <string>
This searches the whole database (in every field) for the
string that you supplied and displays it in the normal way.
SHRINK
This reduces WBase from its full screen mode to its Workbench
window mode.
SORTALL <field number>
This sorts the whole file by the field number specified.
SORTSEC <field number> <start record> <end record>
This sorts a section of the file (between start and end
inclusive) by the field number specified.
VERSION
This returns what version of WBase this is. It could be
useful later if I add new ARexx commands and you want to know
if the version of WBase which is running supports them. The
version number is returned in 'result'.
VIEW <record number>
This simply lets you view a single record, the same as 'View
Single' in the menus does.
VIEWALL
This is exactly the same as 'View All' in the menus.
VIEWSEC <start record> <end record>
This allows you to view a section of records between start and
end inclusive.
WBase file format
=================
This section is for anybody who either wants to allow their database to load
in WBase files or anyone who wants to be able to change things like the
maximum number of records available in a file.
Lets suppose that you created a database with three fields:
Name
Age
Address
And you said that you wanted a maximum space for ten records. If you did that
then here is what the data file will look like:
WB10,2,3
Name
Age
Address
John Smith
46
London
The WB at the beginning is WBases check to make sure that it is a WBase file.
The ten is the maximum number of records and the two is the number of records
which have been used with one added onto it. The three is the number of
fields which the database has. It doesn't matter how many characters the
numbers take up as long as they have a comma separating them.The next three
lines are the field names, the number of lines depends on how many fields you
have put in before. There aren't any quotes around the fieldnames or data
because they are a bit pointless. The data is listed after the fieldnames in
the same format. One note: if you leave spaces on either side of the text it
gets stripped away as soon as it is loaded into WBase. In later versions of
WBase, if I need to save more data then I will save it at the end of current
files, so that files saved by previous versions will still be able to be
read.
Possible future improvements
============================
- Including graphics as fields (what do you think? And how could it
work?).
- Reading a powerpacked file straight from memory instead of from a
temporary file.
- Using a disk based file instead of keeping it in memory or
dynamically allocating memory as I need it instead of reserving
about 200K at the start. I think I know how I could do this in
theory (it's very hard from GFA-BASIC though, as the standard way of
getting more memory wipes out all current data).
- Any necessary bug fixes
- Any other suggestions that you make.
(Please suggest something as I am running out of ideas !!! I will
attempt to include it if it is sensible enough.)
Please send any bug reports, ideas about improvements,criticism
(constructive), and anything else to:
Simon Dick,
31 Salisbury Road,
Bexley,
Kent DA5 3QE,
England
Just a warning, but if nobody sends me any ideas then there may not be any
future upgrades for WBase, unless I can think of some other things to add.
I will also be happy to try to help you if you can't work some function out,
both in WBase and GFA-Basic (most commands), just write to me and I will try
to help you out.
If anyone is interested, I have just finished writing a test version of WNet,
a file sender which works through the serial port, it also allows the sending
of messages and commands, you can also get files from the other computer. If
anyone would like to test it for me, I can't as I only have one Amiga, please
send a disk and postage and I will send you the test version.
kd_freq.library is Copyright 1990,1991 Khalid Aldoseri.
powerpacker.library and reqtools.library are Copyright Nico François.
Thanks to Olaf Barthel for his rexxhost.library without which WBase probably
wouldn't have an ARexx interface!
Changes from V1.2
=================
- I made WBase totally dependent on the reqtools.library instead of it being
an optional extra, which also decreased the size by about 10K because I
didn't need to use some GFA-Basic functions which increased the size. I
have more than made up for that with other stuff though!
- I worked around the bug in the previous version which wouldn't allow you
to move the window or use any of the system gadgets on the WBase window by
opening the window once, closing it and then opening it again. It's an
awkward method, but it works!
- I decided to give the user a choice of which file requester to use. There
are three choices, the kd_freq.library requester (which comes up as the
default if you have it), the asl.library or the reqtools.library requester
which is always available.
- I decided to use the GetLongA function of ReqTools to input the numbers
instead of getting a string and converting it. This helped make WBase a
tiny bit smaller as now I don't need to do any range checking for those
sections.
- I fixed a small bug which occurred when you chose a command from the file
requester which had a space in its path. It looked for the first section
before the space, it now puts quotes around it and treats it all as a
command.
- Got rid of the annoying quotes around the different fields in the saved
file. So you can load up files from previous versions, when WBase comes
across an entry with quotes on either side it strips them off as well as
any extra spaces on either side.
- Added the option of turning it into a full screen (well, sort of anyway!)
database with gadgets.
- Fixed a bug in the search routine which recorded more than one occurrence
of the pattern in the same record and for some reason displayed the
fieldnames as well occasionally.
- Changed WBase so that it now doesn't save an icon with each data file.
- Altered the method which I used to edit the fieldnames, instead of asking
which field you want to edit it goes through all the fields allowing you
to edit them.
- Now when you input records you can see the previous fields which you have
typed in and also it automatically continues asking you for more files
until you press cancel, which will delete the record you are currently on
so it is best if you start a new record and then press cancel.
- Removed the old method of choosing the number of fields because of the
increased maximum number of fields.
- Added checks for some more vectors in the virus checker section. Some of
them I can't fix as I don't know what they were originally, so you are only
told about them.
- I removed the option to save a PowerPacked file as I don't really see the
point of having it included as you can easily crunch the file with
PowerPacker after saving it normally. WBase still supports loading crunched
files though.
- I finally added an ARexx interface to WBase. I can't test it as I haven't
got ARexx. If anyone finds any bugs in it please could you report them too
me as soon as possible as I will probably start work on the new version
quite soon after this is released.
Changes from V1.1
=================
- I added support for reqtools.library instead of the old req.library.
- A much better file requester thanks to reqtools.library.
- The search printed the records into the small window instead of opening
a new window for it.
- The 'Print Section' and 'Print Single' weren't actually included
accidentally.
- Before, if you tried to load a crunched file which wasn't a WBase file it
wouldn't delete it from disk which meant that you had a file called WB.tmp
floating around somewhere.
- You can now go forward AND backwards in the view and search sections.
- You can now exit from viewing a section.
- Some functions didn't let you cancel them, this is fixed now.
- If you select cancel after selecting 'New' your file is now kept.
- You are asked if you are ready to print before printing each record.
- Changed the position of the window slightly as it got in my way.
- You can now delete records while you are viewing.
- You can also go to records while you are viewing all or a section.
- And you can even edit records while you are viewing them instead of having
to remember which number they where.
- I have included the option of marking records. You mark records while you
are viewing and you can then go back and either view or print the marked
records. When you delete records the marks are all cleared.
- If you have reqtools.library installed then choosing how many fields you
want is made much easier (try it).
- You now have the option of crunching files before you save them to disk.
This only works if you have V35+ of powerpacker.library installed. (It
should have been included with this program)
- Apart from using the menu to quit you can also press escape or 'Q'.
- WBase is now more multitasking friendly. In previous versions it just used
a loop to check the menus, etc., but now it uses Wait() to wait for them.
It also seems slightly faster this way as well.
- The file requester remembers the last file and last directory which were
used and puts them ready in the next file requester.
- WBase can now use the kd_freq.library file requester if reqtools.library
isn't found.